
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-search"></use>
                    </svg>
                    <div class="name">搜索</div>
                    <div class="fontclass">#icon-search</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-taiji"></use>
                    </svg>
                    <div class="name">太极</div>
                    <div class="fontclass">#icon-taiji</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-star"></use>
                    </svg>
                    <div class="name">星星</div>
                    <div class="fontclass">#icon-star</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-case"></use>
                    </svg>
                    <div class="name">方案</div>
                    <div class="fontclass">#icon-case</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-construction-site"></use>
                    </svg>
                    <div class="name">工地</div>
                    <div class="fontclass">#icon-construction-site</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-loans"></use>
                    </svg>
                    <div class="name">贷款</div>
                    <div class="fontclass">#icon-loans</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-back"></use>
                    </svg>
                    <div class="name">back</div>
                    <div class="fontclass">#icon-back</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-right"></use>
                    </svg>
                    <div class="name">right</div>
                    <div class="fontclass">#icon-right</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-view"></use>
                    </svg>
                    <div class="name">查看</div>
                    <div class="fontclass">#icon-view</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-social-security"></use>
                    </svg>
                    <div class="name">社保</div>
                    <div class="fontclass">#icon-social-security</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-user"></use>
                    </svg>
                    <div class="name">用户</div>
                    <div class="fontclass">#icon-user</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-close"></use>
                    </svg>
                    <div class="name">关闭</div>
                    <div class="fontclass">#icon-close</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-furniture"></use>
                    </svg>
                    <div class="name">家居生活</div>
                    <div class="fontclass">#icon-furniture</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-preferential"></use>
                    </svg>
                    <div class="name">优惠</div>
                    <div class="fontclass">#icon-preferential</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-budget"></use>
                    </svg>
                    <div class="name">预算</div>
                    <div class="fontclass">#icon-budget</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-location"></use>
                    </svg>
                    <div class="name">定位</div>
                    <div class="fontclass">#icon-location</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pics"></use>
                    </svg>
                    <div class="name">多图</div>
                    <div class="fontclass">#icon-pics</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-arrow-down"></use>
                    </svg>
                    <div class="name">下箭头</div>
                    <div class="fontclass">#icon-arrow-down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-water"></use>
                    </svg>
                    <div class="name">水滴</div>
                    <div class="fontclass">#icon-water</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-document"></use>
                    </svg>
                    <div class="name">资料</div>
                    <div class="fontclass">#icon-document</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-comment"></use>
                    </svg>
                    <div class="name">评论</div>
                    <div class="fontclass">#icon-comment</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-change"></use>
                    </svg>
                    <div class="name">换一换</div>
                    <div class="fontclass">#icon-change</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-share"></use>
                    </svg>
                    <div class="name">分享</div>
                    <div class="fontclass">#icon-share</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-app"></use>
                    </svg>
                    <div class="name">应用</div>
                    <div class="fontclass">#icon-app</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-diamond"></use>
                    </svg>
                    <div class="name">钻石</div>
                    <div class="fontclass">#icon-diamond</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-more"></use>
                    </svg>
                    <div class="name">更多</div>
                    <div class="fontclass">#icon-more</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-protection"></use>
                    </svg>
                    <div class="name">售后保障</div>
                    <div class="fontclass">#icon-protection</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ten"></use>
                    </svg>
                    <div class="name">10</div>
                    <div class="fontclass">#icon-ten</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zero"></use>
                    </svg>
                    <div class="name">装修0增项</div>
                    <div class="fontclass">#icon-zero</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-home"></use>
                    </svg>
                    <div class="name">预约家修</div>
                    <div class="fontclass">#icon-home</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-measurement"></use>
                    </svg>
                    <div class="name">面积测量</div>
                    <div class="fontclass">#icon-measurement</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-thumb-up"></use>
                    </svg>
                    <div class="name">推荐</div>
                    <div class="fontclass">#icon-thumb-up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-like"></use>
                    </svg>
                    <div class="name">喜欢</div>
                    <div class="fontclass">#icon-like</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tag"></use>
                    </svg>
                    <div class="name">预约服务</div>
                    <div class="fontclass">#icon-tag</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-audit"></use>
                    </svg>
                    <div class="name">审核</div>
                    <div class="fontclass">#icon-audit</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-qzone"></use>
                    </svg>
                    <div class="name">qq空间</div>
                    <div class="fontclass">#icon-qzone</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-panorama"></use>
                    </svg>
                    <div class="name">全景_填色</div>
                    <div class="fontclass">#icon-panorama</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-moment"></use>
                    </svg>
                    <div class="name">微信朋友圈</div>
                    <div class="fontclass">#icon-moment</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sina"></use>
                    </svg>
                    <div class="name">新浪微博</div>
                    <div class="fontclass">#icon-sina</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-time"></use>
                    </svg>
                    <div class="name">time</div>
                    <div class="fontclass">#icon-time</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-play"></use>
                    </svg>
                    <div class="name">播放</div>
                    <div class="fontclass">#icon-play</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-password"></use>
                    </svg>
                    <div class="name">密码</div>
                    <div class="fontclass">#icon-password</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mobile"></use>
                    </svg>
                    <div class="name">手机</div>
                    <div class="fontclass">#icon-mobile</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-design"></use>
                    </svg>
                    <div class="name">赞服务_设计</div>
                    <div class="fontclass">#icon-design</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bank"></use>
                    </svg>
                    <div class="name">银行</div>
                    <div class="fontclass">#icon-bank</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-decorate"></use>
                    </svg>
                    <div class="name">装修_复制</div>
                    <div class="fontclass">#icon-decorate</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-clean"></use>
                    </svg>
                    <div class="name">日常保洁</div>
                    <div class="fontclass">#icon-clean</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-code"></use>
                    </svg>
                    <div class="name">手机验证</div>
                    <div class="fontclass">#icon-code</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-sofa"></use>
                    </svg>
                    <div class="name">iconfont-家具软装</div>
                    <div class="fontclass">#icon-sofa</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-house"></use>
                    </svg>
                    <div class="name">iconfont-竣工验收</div>
                    <div class="fontclass">#icon-house</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-down"></use>
                    </svg>
                    <div class="name">箭头</div>
                    <div class="fontclass">#icon-down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-up"></use>
                    </svg>
                    <div class="name">箭头</div>
                    <div class="fontclass">#icon-up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-protection-fill"></use>
                    </svg>
                    <div class="name">保障</div>
                    <div class="fontclass">#icon-protection-fill</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tx"></use>
                    </svg>
                    <div class="name">腾讯微博</div>
                    <div class="fontclass">#icon-tx</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wechat"></use>
                    </svg>
                    <div class="name">微信</div>
                    <div class="fontclass">#icon-wechat</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-price"></use>
                    </svg>
                    <div class="name">价格</div>
                    <div class="fontclass">#icon-price</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-live"></use>
                    </svg>
                    <div class="name">综合-定制出行监管</div>
                    <div class="fontclass">#icon-live</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-pencle"></use>
                    </svg>
                    <div class="name">笔</div>
                    <div class="fontclass">#icon-pencle</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-popularity"></use>
                    </svg>
                    <div class="name">人气</div>
                    <div class="fontclass">#icon-popularity</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-hot-line"></use>
                    </svg>
                    <div class="name">客服热线</div>
                    <div class="fontclass">#icon-hot-line</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-top"></use>
                    </svg>
                    <div class="name">返回顶部</div>
                    <div class="fontclass">#icon-top</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-designer"></use>
                    </svg>
                    <div class="name">设计师</div>
                    <div class="fontclass">#icon-designer</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-nav"></use>
                    </svg>
                    <div class="name">导航</div>
                    <div class="fontclass">#icon-nav</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-building"></use>
                    </svg>
                    <div class="name">icon-fangzi</div>
                    <div class="fontclass">#icon-building</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tel"></use>
                    </svg>
                    <div class="name">联系电话</div>
                    <div class="fontclass">#icon-tel</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-bricklayer"></use>
                    </svg>
                    <div class="name">瓦工</div>
                    <div class="fontclass">#icon-bricklayer</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-inventory"></use>
                    </svg>
                    <div class="name">原材料库存</div>
                    <div class="fontclass">#icon-inventory</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-backtop"></use>
                    </svg>
                    <div class="name">返回顶部</div>
                    <div class="fontclass">#icon-backtop</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-picture"></use>
                    </svg>
                    <div class="name">图片</div>
                    <div class="fontclass">#icon-picture</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-company"></use>
                    </svg>
                    <div class="name">装修公司</div>
                    <div class="fontclass">#icon-company</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
